#ifndef __ATA_H
#define __ATA_H

#include <common/types.h>
#include <hardwarecommunication/port.h>
#include <common/common.h>
class Ata
{
private:
    /* data */
    Port16Bit dataPort;
    Port8Bit errorPort;
    Port8Bit selectCountPort;
    Port8Bit lbaLowPort;
    Port8Bit lbaMidPort;
    Port8Bit lbaHiPort;
    Port8Bit devicePort;
    Port8Bit commandPort;
    Port8Bit controlPort;

    bool master;
    uint16_t bytesPerSector;
public:
    Ata(uint16_t portBase, bool master);
    ~Ata();

    void Identify();
    void Read28(uint32_t sector, uint8_t* data, int32_t count);
    void Writr28(uint32_t sector, uint8_t* data, int count);
    void Flush();

};





#endif